home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PsL Monthly 1993 December
/
PSL Monthly Shareware CD-ROM (December 1993).iso
/
prgmming
/
dos
/
c
/
stdlib1.exe
/
lha
/
STRUPR.ASM
< prev
next >
Wrap
Assembly Source File
|
1990-07-16
|
1KB
|
62 lines
stdlib segment para public 'slcode'
assume cs:stdlib
;
extrn $uprtbl:byte, sl_strdup:far
;
; strupr- Converts to upper case all lower case characters in the string
; pointed at by es:di.
;
; strupr2- Same as above except it creates a new string then converts the
; characters in the new string. The original string is unchanged.
;
; inputs:
; es:di- Buffer for destination string.
;
; outputs:
; es:di- Points at converted string (points at new string
; for strupr2).
;
public sl_strupr
;
sl_strupr proc far
push es
push ds
push ax
push bx
pushf
push si
push di
;
mov si, es
mov ds, si
mov si, di
lea bx, $uprtbl
ToUprLp: lodsb
xlat cs:$uprtbl
stosb
cmp al, 0
jne ToUprLp
;
pop di
pop si
popf
pop bx
pop ax
pop ds
pop es
ret
sl_strupr endp
;
;
public sl_strupr2
;
sl_strupr2 proc far
call sl_strdup
jc RetFar
jmp near ptr sl_strupr
RetFar: ret
sl_strupr2 endp
;
stdlib ends
end